﻿{#template MAIN}
<table id="dataGrid" cellpadding="5" cellspacing="0" class="grid">
    <thead>
        <tr>
            <th>
                Seq
            </th>
            <th>
                Request#
            </th>
            <th>
                Purpose
            </th>
            <th>
                Kind of Stamp
            </th>
            <th>
                Stamped Type
            </th>
            <th>
                Request Date
            </th>
            <th>
                Status
            </th>
        </tr>
    </thead>
    <tbody>
        {#foreach $T.List as item}
        <tr class="{#cycle values=['','evenRow']}" id="{$T.item.ID}">
            <td align="center" style="width: 25px">
                <a href='javascript:void(0)' class="button-view">{$T.item$index + 1 + ($T.PageNum -
                    1) * $T.PageSize} </a>
            </td>
            <td style="width: 18%">
                <a href="/Pages/{#if $T.item.IsClosed}ViewRequestForm{#else}AdminConfirmForm{#/if}.aspx?q={$T.item.RequestID}">{$T.item.RequestID}</a>
                {#if $T.item.RequestType == 2 } <b style="color: red">Urgent</b> {#/if}
            </td>
            {#include ROW root=$T.item}
        </tr>
        {#/for}
    </tbody>
</table>
{#/template MAIN} {#template ROW}
<td>
    {$T.Purpose}
</td>
<td style="width: 12%">
    {$T.StampName}
</td>
<td style="width: 12%">
    {$T.STName}
</td>
<td style="width: 80px">
    {$T.DateRequestText}
</td>
<td style="width: 130px">
    {#foreach $T.ApprovalHistoryList as item}
    <div style="border-bottom: 1px dashed #888;" class="status">
        {#include CHILD root=$T.item}
    </div>
    {#/for} {#if $T.DeptName != '' }
    <label style="color: red">
        Not approved: {$T.DeptName}</label>
    {#/if}
</td>
{#/template ROW} {#template CHILD}
<div class="approved">
</div>
<label style="color: {#if $T.Status == 1 }green{#else}violet{#/if};">
    {$T.StatusName} by: {$T.ApprovedBy}<br />
    ({$T.ApprovedDateText})</label>
{#/template CHILD}